package com.cwl.pattern.策略模式;

/**
 * @program: pattern
 * @description:
 * @author: ChenWenLong
 * @create: 2019-06-24 13:56
 **/
public class CashContext {

    private CashSuper cs;
    /**
     * 使用构造方法来进行选择具体的收费策略
     *
     * @param cashSuper
     */
    public CashContext(CashSuper cashSuper) {
        this.cs = cashSuper;
    }
    public Double getResult(Double money){
        return cs.acceptCash(money);
    }
}
